package com.lujieni.springbootmybatis.po;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.lujieni.springbootmybatis.handler.EncryptTypeHandler;
import lombok.Data;
import lombok.ToString;

import java.util.List;

/**
 * @Package: com.lujieni.tkmapper.domain.po
 * @ClassName: PersonPO
 * @Author: lujieni
 * @Description: t_person实体类
 * @Date: 2020-12-17 17:27
 * @Version: 1.0
 *
 * autoResultMap = true hobbys会反序列为对象
 *
 */
@Data
@TableName(value = "t_person", autoResultMap = true)
@ToString(callSuper = true)
public class PersonDO extends TenantDO {

    private String myName;

    private Integer myAge;

    // 字段加密添加自定义注解即可,很方便 在获取数据的时候也会帮你解密
    @TableField(typeHandler = EncryptTypeHandler.class)
    private String email;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Hobby> hobbys;
}